-- Recipe2 --
--AddRecipe2("i26_laotie",{
--    Ingredient("twigs", 3),
--    Ingredient("goldnugget", 10),
--    Ingredient("rocks", 20),
--    },TECH.NONE,
--    {
--        builder_tag = "i26",
--        atlas = "images/iii/i26_laotie.xml",
--        image = "i26_laotie_0.tex"
--    },
--    {"CHARACTER"}
--)
--AddRecipe2("i26_skillpoint",{
--    Ingredient("goldnugget", 10),
--    },TECH.NONE,
--    {
--        builder_tag = "i26build1",
--        atlas = "images/iii/i26_skillpoint.xml",
--        image = "i26_skillpoint.tex",
--    },
--    {"CHARACTER"}
--)
--AddRecipe2("i26_skillpoint2",{
--    Ingredient("goldnugget", 20),
--    },TECH.NONE,{
--        builder_tag = "i26build2",
--        atlas = "images/iii/i26_skillpoint.xml",
--        image = "i26_skillpoint.tex",
--        -- product = "i26_skillpoint",
--        -- description="i26_skillpoint",
--    },
--    {"CHARACTER"}
--)
local ENTITY_LIST = TUNING.ENTITY_LIST
-- 配方定义
local RECIPES = {
    -- 老铁配方
    i26_laotie = {
        ingredients = {
            { name = "twigs", amount = 3 },
            { name = "goldnugget", amount = 10 },
            { name = "rocks", amount = 20 }
        },
        tech = TECH.NONE,
        config = {
            builder_tag = "i26",
            atlas = "images/iii/i26_laotie.xml",
            image = "i26_laotie_0.tex"
        }
    },

    -- 技能点配方1
    i26_skillpoint = {
        ingredients = {
            { name = "goldnugget", amount = 10 }
        },
        tech = TECH.NONE,
        config = {
            builder_tag = "i26build1",
            atlas = "images/iii/i26_skillpoint.xml",
            image = "i26_skillpoint.tex"
        }
    },
    -- 彩虹宝石配方
    i26_opalpreciousgem = {
        ingredients = {
            { name = "redgem", amount = 1 },
            { name = "bluegem", amount = 1 },
            { name = "greengem", amount = 1 },
            { name = "yellowgem", amount = 1 },
            { name = "orangegem", amount = 1 },
            { name = "purplegem", amount = 1 },
        },
        tech = TECH.ANCIENT_FOUR,
        config = {
            builder_tag = "i26",
            product = "opalpreciousgem",
            numtogive = 1,
        }
    },
    -- 萌芽石树苗
    i26_ancienttree_gem_sapling_item = {
        ingredients = {
            { name = "ancienttree_seed", amount = 1 },
            { name = "ancientfruit_gem", amount = 20 }, -- 晶洞果
        },
        tech = TECH.ANCIENT_FOUR,
        config = {
            builder_tag = "i26",
            product = "ancienttree_gem_sapling_item",
            numtogive = 2,
        }
    },
    -- 阴郁之棘树苗
    i26_ancienttree_nightvision_sapling_item = {
        ingredients = {
            { name = "ancienttree_seed", amount = 1 },
            { name = "ancientfruit_nightvision", amount = 20 }, -- 夜苺
        },
        tech = TECH.ANCIENT_FOUR,
        config = {
            builder_tag = "i26",
            product = "ancienttree_nightvision_sapling_item",
            numtogive = 2,
        }
    },

    -- 技能点配方2
    i26_skillpoint2 = {
        ingredients = {
            { name = "goldnugget", amount = 20 }
        },
        tech = TECH.NONE,
        config = {
            builder_tag = "i26build2",
            atlas = "images/iii/i26_skillpoint.xml",
            image = "i26_skillpoint.tex"
        }
    },

    [ENTITY_LIST.JIANMU_SAPLING.id] = {
        ingredients = ENTITY_LIST.JIANMU_SAPLING.ingredients,
        tech = TECH.NONE,
        config = {
            builder_tag = "i26",
            atlas = ENTITY_LIST.JIANMU_SAPLING.atlasPath,
            image = ENTITY_LIST.JIANMU_SAPLING.id .. ".tex"
        }
    },

    [ENTITY_LIST.I26_FLOWER_SACK.id] = {
        ingredients = ENTITY_LIST.I26_FLOWER_SACK.ingredients,
        tech = TECH.SCIENCE_TWO,
        config = {
            builder_tag = "i26",
            image = ENTITY_LIST.I26_FLOWER_SACK.id .. ".tex",
            atlas = ENTITY_LIST.I26_FLOWER_SACK.atlasPath
        },
        tags = {
            "DECOR",
            "CONTAINERS",
            "CHARACTER"
        }
    }
}


-- 注册所有配方
for name, recipe in pairs(RECIPES) do
    AddCustomRecipe(
            name,
            recipe.ingredients,
            recipe.tech,
            recipe.config,
            recipe.tags
    )
end
